package com.ruoyi.category.domain;

import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysMenu;
import lombok.Data;
import lombok.Getter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.TreeEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 商品分类信息对象 wdm_goods_category
 * 
 * @author ruoyi
 * @date 2025-06-01
 */
@Data
public class GoodsCategory extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** 分类ID */
    private Long categoryId;

    /** 分类名称 */
    @Excel(name = "分类名称")
    private String categoryName;

    /** 分类图标 */
    @Excel(name = "分类图标")
    private String iconUrl;

    /** 顺序 */
    @Excel(name = "顺序")
    private Long sortOrder;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 删除 */
    private String delFlag;

    /** 版本号 */
    private Long version;

    private Long merchantId;

    /** 子部门 */
    @Getter
    private final List<GoodsCategory> children = new ArrayList<GoodsCategory>();


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("categoryId", getCategoryId())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .append("categoryName", getCategoryName())
            .append("iconUrl", getIconUrl())
            .append("sortOrder", getSortOrder())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("version", getVersion())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .append("merchantId", getMerchantId())
            .toString();
    }
}
